import request from './request.js';

// 获取用户信息
export const getChainInfo = (params) => {
	return request({
		url: '/api/index',
		method: 'GET',
		data: params
	});
};

// 获取余额
export const getBalances = (params) => {
	return request({
		url: '/api/getBalances',
		method: 'POST',
		data: params
	});
};

// 获取交易记录
export const getTxlist = (params) => {
	return request({
		url: '/api/getTxlist',
		method: 'POST',
		data: params
	});
};

// 获取币价
export const getCoinUsdt = (params) => {
	return request({
		url: '/api/getCoinUsdt',
		method: 'POST',
		data: params
	});
};
// 获取xieyi
export const getArticle = (params) => {
	return request({
		url: '/api/article',
		method: 'GET',
		data: params
	});
};
// 获取轮博
export const getSlide = (params) => {
	return request({
		url: '/api/slide',
		method: 'GET',
		data: params
	});
};
//获取交易详情
export const getTransction = (params) => {
	return request({
		url: '/api/getTransction',
		method: 'POST',
		data: params
	});
};
//获取app版本
export const getApp_config = (params) => {
	return request({
		url: '/api/app_config',
		method: 'GET',
		data: params
	});
};
//获取授权检测
export const getApproveList = (params) => {
	return request({
		url: '/api/getApproveList',
		method: 'POST',
		data: params
	});
};
//跨链记录
export const crossLogs = (params) => {
	return request({
		url: '/api/crossLogs',
		method: 'GET',
		data: params
	});
};
//兑换记录
export const swapLogs = (params) => {
	return request({
		url: '/api/swapLogs',
		method: 'GET',
		data: params
	});
};
//关于我们外链
export const ext_links = (params) => {
	return request({
		url: '/api/ext_links',
		method: 'GET',
		data: params
	});
};
// 获取tron签名解析数据
export const tronParseData = (params) => {
	return request({
		url: '/api/tronParseData',
		method: 'POST',
		data: params
	});
};
// 获取eth签名解析数据
export const ethParseData = (params) => {
	return request({
		url: '/api/ethParseData',
		method: 'POST',
		data: params
	});
};
// 获取允许swaper的代币信息
export const getSwapCoin = (params) => {
	return request({
		url: '/api/get_swap_coin',
		method: 'GET',
		data: params
	});
};
// 获取DAPPS信息
export const getdapps = (params) => {
	return request({
		url: '/api/dapp_lists',
		method: 'GET',
		data: params
	});
};
// 获取跨链最小数量和手续费
export const getcrossinfo = (params) => {
	return request({
		url: '/api/get_chain_config',
		method: 'GET',
		data: params
	});
};

// 兑换记录生成
export const addSwapLog = (params) => {
	return request({
		url: '/api/addSwapLog',
		method: 'POST',
		data: params
	});
};
// 兑换记录生成
export const addCrossLog = (params) => {
	return request({
		url: '/api/addCrossLog',
		method: 'POST',
		data: params
	});
};

// 获取行情列表
export const geMarkinfo = (params) => {
	return request({
		url: '/api/market',
		method: 'GET',
		data: params
	});
};
export const pairInfo = (params) => {
	return request({
		url: '/api/pair_info',
		method: 'GET',
		data: params
	});
};

export const kline = (params) => {
	return request({
		url: '/api/kline',
		method: 'GET',
		data: params
	});
};
